package com.ruoyi.durian.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.enums.OrderType;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.durian.domain.LlOrderInfo;
import com.ruoyi.durian.mapper.LlOrderMapper;
import com.ruoyi.durian.service.LlOrderInfoService;
import com.ruoyi.durian.mapper.LlOrderInfoMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @author Lenovo
 * @description 针对表【ll_order_info(订单模块-订单详情表)】的数据库操作Service实现
 * @createDate 2024-08-06 18:29:21
 */
@Service
public class LlOrderInfoServiceImpl extends ServiceImpl<LlOrderInfoMapper, LlOrderInfo>
        implements LlOrderInfoService {

    @Resource
    LlOrderMapper llOrderMapper;
    @Resource
    LlOrderInfoMapper llOrderInfoMapper;

    /**
     * 发票列表
     *
     * @param
     * @return
     */
    @Override
    public List<LlOrderInfo> invoiceList() {
        Long userId = SecurityUtils.getUserId();
        List<LlOrderInfo> llOrderInfoList = llOrderInfoMapper.invoiceList(userId);

        return llOrderInfoList;
    }

    @Override
    public List<Map<String, Object>> getOrderList() {
        Long userId = SecurityUtils.getUserId();
        return llOrderMapper.getOrderList(userId);
    }

    /**
     * 进行中订单列表
     *
     * @return
     */
    @Override
    public List<Map<String, Object>> getUnderWayList() {
        Long userId = SecurityUtils.getUserId();
        return llOrderMapper.getUnderWayList(userId);
    }


}




